package spr;

import static org.junit.Assert.assertEquals;
import org.junit.Test;
import robocode.Rules;
import spr.test.RobotTestBed;

/**
 * This JUnit test makes sure that RastaBot is firing max power.
 * 
 * @author Shaun Ramento
 */
public class TestGunPower extends RobotTestBed {

  /**
   * Specifies that Fire and RastaBot are to be matched up in this test case.
   * 
   * @return The comma-delimited list of robots in this match.
   */
  @Override
  public String getRobotNames() {
    return "sample.Fire,spr.RastaBot";
  }

  /**
   * This test runs for 10 rounds.
   * 
   * @return The number of rounds.
   */
  @Override
  public int getNumRounds() {
    return 10;
  }

  /**
   * Test to make sure that the robot is firing at full power.
   */

  @Test
  public void testFireMax() {
    RastaBot robot = new RastaBot();
    assertEquals("Test if bullet power is at max", robot.fireMax, Rules.MAX_BULLET_POWER, 0.0);
  }

}
